package com.example.lotterysystem.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserIdentityEnum {

    ADMIN("管理员"), NORMAL("普通用户");
    private final String type;

    public static UserIdentityEnum forName(String name){
        for (UserIdentityEnum enums : UserIdentityEnum.values()) {
            if(enums.name().equalsIgnoreCase(name)){
                return enums;
            }
        }
        return null;
    }
}
